package com.baidu.shop.service;

import com.baidu.shop.base.Result;
import com.baidu.shop.dto.BrandDTO;
import com.baidu.shop.dto.SpecParamDTO;
import com.baidu.shop.entity.BrandEntity;
import com.baidu.shop.entity.SpecParamEntity;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Description:
 * @ClassName: BrandService
 * @Author: User
 * @date: 2020.08.31 14:42
 * @version: 1.0
 */
@Api(tags = "商品品牌接口")
public interface BrandService {

    @GetMapping("/brand/getBrand")
    @ApiOperation(value = "查询")
    Result<PageInfo<BrandEntity>> getBrand(BrandDTO brandDTO);

    @PostMapping("/brand/save")
    @ApiOperation(value = "新增")
    Result saveBrand(@RequestBody  BrandDTO brandDTO);

    @GetMapping("/brand/getCategory")
    @ApiOperation(value = "根据品牌id查询分类")
    Result getCategory(Integer id);

    @GetMapping("/brand/getBrandByCategory")
    @ApiOperation(value = "根据分类id查询品牌")
    Result getBrandByCategory(Integer cid);

    @PutMapping("/brand/save")
    @ApiOperation(value = "修改")
    Result editBrand(@RequestBody  BrandDTO brandDTO);

    @DeleteMapping("/brand/del")
    @ApiOperation(value = "修改")
    Result delBrand(Integer id);

    @GetMapping("/brand/getBrandByIdList")
    @ApiOperation(value = "根据品牌id集合获取品牌信息")
    Result<List<BrandEntity>> getBrandByIdList(@RequestParam String brandIds);
}
